package com.lbkj.ops.common.util;

import com.lbkj.ops.model.OpsUser;

/**
 * @author jian.liu
 * @date 2020/10/28
 */
public class SessionUtils {

    private final static String LOGIN_KEY = "_LOGIN_";

    public static OpsUser getLoginUser() {
        return (OpsUser)ServletUtils.getSession().getAttribute(LOGIN_KEY);
    }

    public static void putLoginUser(OpsUser user) {
        ServletUtils.getSession().setAttribute(LOGIN_KEY, user);
    }
}
